package com.nondo.dean.product.mapper;

import com.nondo.dean.product.domain.ProductLog;
import com.nondo.dean.product.domain.ProductLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface ProductLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductLogSqlProvider.class, method="countByExample")
    long countByExample(ProductLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @DeleteProvider(type=ProductLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(ProductLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @Delete({
        "delete from product_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @Insert({
        "insert into product_log (id, type, ",
        "body, user_id, product_id, ",
        "user_name, create_by, ",
        "create_date, update_by, ",
        "update_date, remarks, ",
        "del_flag)",
        "values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, ",
        "#{body,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, ",
        "#{userName,jdbcType=VARCHAR}, #{createBy,jdbcType=BIGINT}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, ",
        "#{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ",
        "#{delFlag,jdbcType=CHAR})"
    })
    int insert(ProductLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @InsertProvider(type=ProductLogSqlProvider.class, method="insertSelective")
    int insertSelective(ProductLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="product_id", property="productId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<ProductLog> selectByExampleWithRowbounds(ProductLogExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @SelectProvider(type=ProductLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="product_id", property="productId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<ProductLog> selectByExample(ProductLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @Select({
        "select",
        "id, type, body, user_id, product_id, user_name, create_by, create_date, update_by, ",
        "update_date, remarks, del_flag",
        "from product_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="product_id", property="productId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    ProductLog selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @UpdateProvider(type=ProductLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ProductLog record, @Param("example") ProductLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @UpdateProvider(type=ProductLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") ProductLog record, @Param("example") ProductLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @UpdateProvider(type=ProductLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ProductLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table product_log
     *
     * @mbg.generated Mon Jun 25 11:55:32 CST 2018
     */
    @Update({
        "update product_log",
        "set type = #{type,jdbcType=VARCHAR},",
          "body = #{body,jdbcType=VARCHAR},",
          "user_id = #{userId,jdbcType=INTEGER},",
          "product_id = #{productId,jdbcType=INTEGER},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ProductLog record);
}